<?php
declare (strict_types = 1);

namespace app\api\model\v1;

use think\Model;
use think\model\relation\BelongsTo;

/**
 * @mixin \think\Model
 */
class Folder extends AppModel
{
    //用户关联
    public function user()
    {
        return $this->belongsTo(Users::class,'create_id');
    }
    //项目关联
    public function project(){
        return $this->belongsTo(Project::class,'project_id');
    }
    //一级指标关联
    public function projectType(){
        return $this->belongsTo(ProjectType::class,'project_type_id');
    }
    //项目样本点关联
    public function projectSample(){
        return $this->belongsTo(ProjectSample::class,'project_sample_id');
    }
    //文件夹关联
    public function folder(){
        return $this->hasMany(GatherFile::class,'folder_id');
    }
    
}
